/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.p10.miage.gestionabsence.model;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Sofian Seid
 */
public class Utilisateur {
    
    private String nom;
    private String prenom;
    private String mail;
    private String passwd;

    public Utilisateur() {
    }

    public Utilisateur(String nom, String prenom, String mail, String passwd) {
        this.nom = nom;
        this.prenom = prenom;
        this.mail = mail;
        this.passwd = passwd;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public String getPrenom() {
        return prenom;
    }

    public void setPrenom(String prenom) {
        this.prenom = prenom;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }
    
    public void init(ResultSet resultat) throws SQLException{
        this.nom = resultat.getString("NOM");
        this.prenom = resultat.getString("PRENOM");
        this.mail = resultat.getString("MAIL");
        this.passwd = resultat.getString("PASSWD");
    }
}
